import { createRouter, createWebHistory, RouteRecordRaw } from 'vue-router'
import LoginPage from "../views/LoginPage.vue"
import IndexPage from "../views/IndexPage.vue"
import TestPage from "../views/test.vue"
import BookList from "../views/BookList.vue"
import BookSales from "../views/BookSales.vue"
import HelpPage from "../views/HelpPage.vue"
import CartPage from '../views/CartPage.vue'

const routes: Array<RouteRecordRaw> = [
  {
    path: '/',
    component: LoginPage
  },
  {
    path: '/index',
    name: 'index',
    component: IndexPage
  },
  {
    path: '/test',
    name: 'test',
    component: TestPage
  },
  {
    path: '/login',
    name: 'Login',
    component: LoginPage,
  },
  {
    path: '/booklist',
    name: 'booklist',
    component: BookList,
  },
  {
    path: '/booksales',
    name: 'booksales',
    component: BookSales,
  },
  {
    path: '/help',
    name: 'help',
    component: HelpPage,
  },
  {
    path: '/cart',
    name: 'Cart',
    component: CartPage,
  }
]

const router = createRouter({
  history: createWebHistory(),
  routes
})

export default router
